<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>浏览器常见事件</title>
    <style>
        body{
            width: 3000px;
            height: 3000px;
        }
    </style>
</head>

<body>
    <img src="http://www.mobiletrain.org/March/images/mo-pc.jpg" alt="">
    <script>
        //资源加载完毕
        window.onload = function () {
            console.log('资源已经加载完毕')

            //窗口尺寸改变
            window.onresize = function () {
                console.log('窗口尺寸发生改变了')
            }

            //滚动条位置变化
            window.onscroll=function(){
                console.log('滚动条位置改变了')
            }
        }
    </script>
</body>

</html>